Create a creative
Creates a new creative asset and returns information about the created creative.
curl --request POST \
--url https://your_a2_service/creatives \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
'import requests
url = "https://your_a2_service/creatives"
payload = {
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
banner: {ext: {}, img: '', link: {ext: {}, url: ''}},
cid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
created_at: '2023-11-07T05:31:56Z',
description: '<string>',
height: 0,
native: {ext: {}, link: {ext: {}, url: ''}},
status: 'inactive',
updated_at: '2023-11-07T05:31:56Z',
video: {
adm: '',
ctype: 2,
dur: 0,
ext: {cdn: '', linear: 1, link: {ext: {}, url: ''}, url: ''},
mime: ''
},
width: 0
})
};
fetch('https://your_a2_service/creatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/creatives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'banner' => [
'ext' => [
],
'img' => '',
'link' => [
'ext' => [
],
'url' => ''
]
],
'cid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'height' => 0,
'native' => [
'ext' => [
],
'link' => [
'ext' => [
],
'url' => ''
]
],
'status' => 'inactive',
'updated_at' => '2023-11-07T05:31:56Z',
'video' => [
'adm' => '',
'ctype' => 2,
'dur' => 0,
'ext' => [
'cdn' => '',
'linear' => 1,
'link' => [
'ext' => [
],
'url' => ''
],
'url' => ''
],
'mime' => ''
],
'width' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/creatives"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/creatives")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/creatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"no": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "banner",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Represents a creating creative entity.
The name of creative
The owner's id of creative
The type of creative
banner, video, native Represents a banner creative with image, link, and optional extensions.
Show child attributes
Show child attributes
The id of the campaign the creative is used in
The time the creative was created
The creative's description
The height that will be shown
Represents a native creative with link and optional extensions.
Show child attributes
Show child attributes
The status of creative
active, inactive The time the creative was updated
Represents a video creative with MIME type, URL, and optional extensions.
Show child attributes
Show child attributes
The width that will be shown
Response
Successful Response
Represents a reading creative entity.
The id of creative
The name of creative
The no of creative
The owner's id of creative
The type of creative
banner, video, native Represents a banner creative with image, link, and optional extensions.
Show child attributes
Show child attributes
The id of the campaign the creative is used in
The time the creative was created
The creative's description
The height that will be shown
Represents a native creative with link and optional extensions.
Show child attributes
Show child attributes
The status of creative
active, inactive The time the creative was updated
Represents a video creative with MIME type, URL, and optional extensions.
Show child attributes
Show child attributes
The width that will be shown
Was this page helpful?
curl --request POST \
--url https://your_a2_service/creatives \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
'import requests
url = "https://your_a2_service/creatives"
payload = {
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
banner: {ext: {}, img: '', link: {ext: {}, url: ''}},
cid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
created_at: '2023-11-07T05:31:56Z',
description: '<string>',
height: 0,
native: {ext: {}, link: {ext: {}, url: ''}},
status: 'inactive',
updated_at: '2023-11-07T05:31:56Z',
video: {
adm: '',
ctype: 2,
dur: 0,
ext: {cdn: '', linear: 1, link: {ext: {}, url: ''}, url: ''},
mime: ''
},
width: 0
})
};
fetch('https://your_a2_service/creatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/creatives",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'banner' => [
'ext' => [
],
'img' => '',
'link' => [
'ext' => [
],
'url' => ''
]
],
'cid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'created_at' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'height' => 0,
'native' => [
'ext' => [
],
'link' => [
'ext' => [
],
'url' => ''
]
],
'status' => 'inactive',
'updated_at' => '2023-11-07T05:31:56Z',
'video' => [
'adm' => '',
'ctype' => 2,
'dur' => 0,
'ext' => [
'cdn' => '',
'linear' => 1,
'link' => [
'ext' => [
],
'url' => ''
],
'url' => ''
],
'mime' => ''
],
'width' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/creatives"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://your_a2_service/creatives")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/creatives")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"banner\": {\n \"ext\": {},\n \"img\": \"\",\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"cid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"height\": 0,\n \"native\": {\n \"ext\": {},\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n }\n },\n \"status\": \"inactive\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"video\": {\n \"adm\": \"\",\n \"ctype\": 2,\n \"dur\": 0,\n \"ext\": {\n \"cdn\": \"\",\n \"linear\": 1,\n \"link\": {\n \"ext\": {},\n \"url\": \"\"\n },\n \"url\": \"\"\n },\n \"mime\": \"\"\n },\n \"width\": 0\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"no": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "banner",
"banner": {
"ext": {},
"img": "",
"link": {
"ext": {},
"url": ""
}
},
"cid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"height": 0,
"native": {
"ext": {},
"link": {
"ext": {},
"url": ""
}
},
"status": "inactive",
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"adm": "",
"ctype": 2,
"dur": 0,
"ext": {
"cdn": "",
"linear": 1,
"link": {
"ext": {},
"url": ""
},
"url": ""
},
"mime": ""
},
"width": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}